Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects


About View Ports, View Devices, and View Groups

The view-related objects in QuickDraw GX exist to support drawing. They work together to provide device-independent drawing destinations for an application, while at the same time allowing access to device characteristics and permitting drawing destinations and devices to be grouped and manipulated in flexible ways.

These are the view-related objects:

Figure 7-1 shows the relationships among the view-related objects and the sequence of events that occur when a shape is drawn.

Figure 7-1 Objects used by the drawing mechanism

As Figure 7-1 shows, a shape's geometry, initially modified by information contained in the shape's style object and ink object, is further modified by the clip and the mapping of the transform object. That modified shape is then even further modified by the mapping and clip of one or more view ports, and modified once more by the mapping and clip of any view devices that intersect the view ports.

A shape cannot be drawn unless its transform object contains a reference to at least one view port. The transform object for the shape in Figure 7-1 references only one view port, so the shape is drawn only once. Transform objects are described in the chapter "Transform Objects" in this book.

Drawing occurs where the clip of a view port overlaps the clip of a view device within the same view group. The overlap is determined by the dimensions of the two clip shapes, both of which are defined in terms of the view group's coordinate space. In this example, the position of the shape in the view port and the overlap between the view port and the view device mean that only part of the shape is rendered.

The view group in Figure 7-1 represents a coordinate space for all view ports and view devices that may be visible to the user of your application. This particular view group is called the onscreen view group because the view devices represent actual screen devices. You can create view groups to draw offscreen as well.

View-related objects are different from most other QuickDraw GX objects in several ways:


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996